﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Linq;

namespace ZF.WS.UserControls
{
    public partial class PersonLeft : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BindMenu();
        }
        #region 左边菜单
        protected void BindMenu()
        {

            XDocument xml = XDocument.Load(Server.MapPath("~/person/sitemenu.xml"));
            var source = from menu in xml.Element("menu").Elements("submenu")
                         select new
                         {

                             M = menu,
                             L = menu.Elements(),
                             COUNT = menu.Elements().Count()
                         };
            lvMenu.DataSource = source;
            lvMenu.DataBind();
        }

        protected bool CheckModule(string module)
        {
            return true;
        }
        #endregion
    }
}